home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Utilities / Programming / EnterAct 3.7.3 / Documentation / EnterAct in brief < prev    next >
Encoding:
Text File  |  1996-06-15  |  20.3 KB  |  476 lines  |  [TEXT/KEEN]

  1. *********EnterAct in brief (this is not the manual) *************
  2. -----------
  3. Introduction
  4. -----------
  5.  
  6. EnterAct is a full C/C++/Java project-oriented editor, with
  7. additional code definition display capabilities. And then some.
  8.  
  9. To use EnterAct with Java source, please see "Adding Java files"
  10. below (<option>click in the title bar for a popup menu).
  11.  
  12.  Most of EnterAct's best features work with first-draft,
  13.  uncompilabe code. As long as the delimiters balance and
  14.  the key words are not too badly misspelled, EnterAct will
  15.  provide instant definition and prototype display, a class
  16.  browser, jumping to definitions, cross-referencing etc.
  17.  
  18.  EnterAct typically needs 4-8 Meg for medium to large projects.
  19.  Sorry, that's the price of power.
  20.  
  21. ---------------
  22. Necessary things
  23. ---------------
  24.  
  25.     Installation
  26. Put EnterAct 3 and the "Drag_on Modules" folder next to the
  27. folder that holds the mac toolbox headers you wish to use the most:
  28. • Symantec: next to the THINK Project Manager
  29. • Metrowerks: next to the compiler you're using
  30. • MPW: next to the "Interfaces" folder.
  31.  
  32. To access either THINK Ref or QuickView, put a "(Tools)" or "Tools"
  33. folder next to EnterAct and drop an alias of THINK Ref or QuickView
  34. (or both) into it. Commands to access these appear at the bottom
  35. of the Search menu.
  36.  
  37. To access the AppleScripts supplied with EnterAct, put the
  38. "(EnterAct Scripts)" folder next to EnterAct.
  39.  
  40. To use code templates, put the "EnterAct Code Templates" file
  41. next to EnterAct.
  42.  
  43.     Adding Java files
  44. Java files should go in the left pane of your project. To put your Java
  45. files in the right place, select "File Extensions..." from the "EnterAct"
  46. menu and type in "java" as an extension for the left pane. If you do
  47. this with no project open, this will affect all new projects.
  48.  
  49. Otherwise, everything for Java files is the same as for C++ files.
  50. For best results, grab the source for the standard java libraries
  51. somewhere (eg CW9) and add it to your project.
  52.  
  53.     Making a new project
  54. Select "New Project" (this same dialog appears when you start up
  55. EnterAct and cancel the "Open Project"dialog). Give your project a
  56. name, and save it.
  57.  
  58. In the subsequent "Select <system> Folder..." dialog that appears,
  59. select the folder that holds your system <header> files. If you
  60. have placed EnterAct within a folder that also holds these files,
  61. you can just Cancel.
  62.  
  63. Add files with the "Add Files..." or "Add All in Folder..." commands -
  64. hold down the <Shift> key and the latter becomes "Add All in
  65. Subfolders...". With the "Add All" commands, use the button at the
  66. bottom of the dialog to add whole folders at once (including all
  67. files in subfolders if the <Shift> key was down).
  68.  
  69. To add all toolbox headers, pick "Add Mac Headers".
  70.  
  71. Add as many or as few files as you want, regardless of whether
  72. they make up a complete project. Neglect not non-source files
  73. (spec, design etc) which end up in the rightmost project window
  74. pane. Source files are in the left pane, headers in the middle. To
  75. force files with nonstandard extensions into particular panes, use
  76. "File Extensions...." to enter the selection and pick the pane.
  77.  
  78. Note that things work best if you include definitions for all the
  79. names in your source code, especially toolbox terms but also
  80. PowerPlant or TCL, and ANSI headers etc.
  81.  
  82. NOTE if a folder's name is in parentheses, the files in it will not
  83. be added to your project. To exclude a folder such as "Old Source",
  84. change its name to "(Old Source)".
  85.  
  86. If you add more than one file with the same name, truncated full
  87. path names will appear to the right of the file name, to help you
  88. tell which file is which. (See "Building a project dictionary" just
  89. below to exclude files from being built into your dictionary).
  90.  
  91. The project window responds to many keys in standard ways.
  92. Go left and right across the three panes with the left and right
  93. arrow keys, <Command><down arrow> to go to the bottom of a
  94. pane etc. To type your way to a particular file, you can type
  95. the first part of the name or any distinctive part of the name
  96. (useful if you have a lot of files whose names all begin with the
  97. same prefix, eg to advance to "PROJECT7_Mouse.c" you could
  98. probably type just "mou").
  99.  
  100. You can open a file from your project window by double-clicking
  101. on it, or hitting <Return>, or use "Go to..." with the name selected.
  102. In all cases, the project window itself will go all the way to the back.
  103.  
  104. Please add this file to your project for handy reference (use "Add
  105. Front File"), and add the "EnterAct 3 Manual" as well - eventually,
  106. you'll want to browse through it.
  107.  
  108.     Building a project dictionary
  109. To exlude a file from being built into your dictionary, hold down
  110. the <Command> key and click on its name in the project window.
  111. A dash '-' will appear to the left of its name, meaning your
  112. dictionary will be "minus" that file.
  113.  
  114. Select "Update Dictionary". If you run into a problem, see
  115. «EnterAct 3 Manual» 126.
  116. (click in the line above and select "Go to..." from the Search menu -
  117. if you've added the manual to your project, this will open the
  118. manual and take you to the line.)
  119.  
  120. Now and then (typically when lookup doesn't give expected
  121. results) issue an "Update Dictionary" to keep your
  122. dictionary current. Your dictionary tracks everything defined
  123. outside of function bodies, so if you add a member to a class
  124. or define a new method, your dictionary will be "out of date".
  125. On an 040 machine running at 25 Mhz an incremental update
  126. takes about 6 secs, a nice little "mini-break".
  127.  
  128.  
  129.     Looking up definitions
  130. The AutoLook window is EnterAct's reason for being, so please
  131. try it out!
  132.  
  133. For any sort of lookup to work, you must have a project with
  134. built dictionary open.
  135.  
  136. Select "AutoLook": when you double-click on or click after a C/C++
  137. or Java name in any window, the AutoLook window will display its
  138. definition. This includes all names for structs, unions, enums,
  139. enum constants, functions, methods, classes, file or global scope
  140. variables, defines, and data members, basically everything that
  141. is defined outside of a function body.
  142.  
  143. The AutoLook window can also display definitions of local
  144. variables. For this to work, the file in question must be a
  145. source file (ie its name must end in .c or cp etc) and if
  146. you've just created a function you should save the file.
  147. Clicking after a local variable name will then produce a
  148. definition in the AutoLook window.
  149.  
  150. AutoLook is less accurate in non-source windows, but it still
  151. works.
  152.  
  153. As of v3.5, AutoLook provides fast extremely accurate lookup for
  154. data member and method names, even in complicated "reference
  155. chains" such as "mObject->SomeMethod().aMember[i].whatsIt"
  156. --just click after any name and the AutoLook window will show
  157. you what it is, or make very good guesses in the rare cases when
  158. the method's context doesn't provide enough scope resolution,
  159. or your spelling is wrong.
  160.  
  161. For a more permanent separate display of the definition, press the
  162. <Enter> key. A separate lookup window will appear. Hold down the
  163. <Option> key and drag in the lookup window's title bar to select the
  164. exact definition you want from a popup menu. Note that local
  165. variables are at present excluded, you'll have to Copy and Paste
  166. from the AutoLook window if you want a separate view of them.
  167. (Tip: for local variables, click after the type name for the variable
  168. in the AutoLook window, and press <Enter> to pop up a separate
  169. window showing the definition.)
  170.  
  171. To look up the struct or class containing a particular member,
  172. again double-click on or click to the right of the name, and press
  173. <Shift><Enter>. A lookup window will appear, holding struct or
  174. class definitions that contain the member. There will often be
  175. several, so use the lookup window's popup menu as described just
  176. above to pick the one you want. The AutoLook window
  177. will usually display the definition you want as soon as you click
  178. to the right of the name, so this isn't much needed unless you
  179. want a separate display of the definition.
  180.  
  181. To use EnterAct as a lookup aid while working mainly with
  182. some other editor: have a relevant EnterAct project open,
  183. dictionary built, AutoLook open and frontmost; in the other
  184. editor, Copy the term you want looked up, and switch to
  185. EnterAct. If the definition does not immediately appear in
  186. the AutoLook window, press <Commmand><Enter>. If it was
  187. a member name and you want the full definitions of the containing
  188. structs or classes, press <Shift><Command><Enter>.
  189.  
  190. All lookup windows including AutoLook are fully editable but
  191. cannot be saved.
  192.  
  193.     Browsing
  194. Select "Browse" from the EnterAct menu. Browse as in THINK C.
  195. Click and <Shift>click on and off of class names to show/hide
  196. multiple inheritance lines. (As mentioned, class browsing works
  197. with first-draft code.)
  198.  
  199. To view a particular class, type the first part or some distinctive
  200. part of its name.
  201.  
  202. If a class "uses" or "has" member classes, these will be listed
  203. below the main class name, separated from it by a white line.
  204. You can also double-click on these names to jump to their
  205. definitions, or click-and-hold to select one of their method
  206. names from a popup.
  207.  
  208. The multiple inheritance lines often aren't enough, so if you
  209. <Option> click on a class name you'll see a popup
  210. listing all of the classes from which it is derived. If you let
  211. go the mouse while over one of these base class names you'll
  212. jump to its definition.
  213.  
  214. If you <Command> click on a class name the resulting popup
  215. will show not only all methods in the class but all methods it
  216. inherits. Note if it's an ENORMOUS list of methods, it make take
  217. 5 seconds for the popup to show-please be patient the first
  218. few times you try this.
  219.  
  220. In all method popups, virtual methods are marked with a "v" so
  221. you can tell at a glance if a method wants or needs or has an
  222. override.
  223.  
  224. Summary of class popups:
  225. • click on a class name: all methods defined by the class
  226. • <Command> click: all inherited methods too
  227. • <Option> click: the immediate parents of a class.
  228.  
  229.     Finding Definitions
  230. Single words: <Option>double-click.
  231.  
  232. Full method names (eg "TCircle::Draw") : select the full name
  233. and use "Find Definition". Or, <Option>double-click on one word,
  234. drag to the other, and release.
  235.  
  236. Just the method name (eg "Draw") :  normally the AutoLook
  237. window will show just the one you want, but even if it
  238. show several you can jump to it by <Option>double-clicking
  239. on the full method name in the AutoLook window.
  240.  
  241. If the AutoLook window doesn't show the one you want,
  242. press <Enter>; a lookup window appears holding full
  243. prototypes for all methods with that name; use the lookup
  244. window's popup menu to pick the one you want; then jump
  245. to it as described above for full method names.
  246.  
  247. More than one definition for a term: 
  248. press <Enter> to look the name up; use the popup menu in the
  249. lookup window to pick the definition you want (<Option> click
  250. in the window's title bar); and then use <Option>double-click on
  251. the name, or "Find Definition" without changing the default
  252. selection. The popup menu includes truncated full path names
  253. for the defining files, so you can tell which definition is which.
  254.  
  255. Static functions and variables: if you're in the file where it is
  256. defined, just <Option>double-click on the name. If you have
  257. several definitions of such a name and you aren't in the file where
  258. it is defined, use the approach for more than one definition described
  259. just above.
  260.  
  261.     Multi-file search
  262. The Find dialog contains buttons to select all files of a particular
  263. type in the project window. Files selected for multi-file
  264. operations (including searching) have bullets (•) to their left in
  265. the project window. To "fine tune" your multi-file selection, hold
  266. down the <Option> key and click or drag right in the project
  267. window.
  268.  
  269. The "Batch" check box generates a list of all lines where the search
  270. string can be found in your multi-file selection. To jump to the
  271. file and line indicated for one of the finds, click on the line and
  272. use "Go to...".
  273.  
  274. Multi-file selections have other uses, such as "Remove •'d files",
  275. input for several "Index" commands, and input for hAWK programs
  276. (see the «hAWK User’s Manual»).
  277.  
  278. Placing a dash '-' beside a project file name indicates that it
  279. should be excluded when building your dictionary, but it's often
  280. the case that you don't want to search those files either.
  281. In the Find dialog, the "Skip '-'" checkbox allows you to exclude
  282. files marked with a dash '-' in the project window when doing
  283. a multi-file operation such as searching.  Please note this
  284. checkbox affects all other buttons in the Find dialog, and all
  285. operations done with the file list. Specifically, the All and
  286. None buttons don't touch files marked with a dash '-' if the
  287. "Skip '-'" checkbox is checked, and such files aren't passed to
  288. a hAWK program, or looked at when you click "Find In Next File".
  289.  
  290. The "Dual Batch Find" button in the Find dialog calls up a separate
  291. (modal alas) dialog that lets you search for two search strings
  292. that occur within a certain number of lines or characters of each
  293. other. Clicking OK fires off a search of your bulleted files, with
  294. results of the search presented in a text window. "Zero" lines
  295. means on the same line, and a separation of zero characters means
  296. the two strings must occur together with no characters between
  297. (as in "Cmd" and "Handle" matching "CmdHandle" or "HandleCmd").
  298. Dual Batch Find obeys your "Match Words" and "Ignore Case"
  299. settings in the main Find dialog.
  300.  
  301.     Accessing THINK Reference
  302. Beside EnterAct at the same level, have a folder entitled "Tools"
  303. or "(Tools)"; drop an alias of THINK Reference in this folder.
  304.  
  305. To look up THINK Ref's thoughts on a term, select it or click
  306. to the right of it and issue "Find in THINK Reference" (<cmd><->).
  307.  
  308.     Accessing Toolbox Assistant
  309. As for THINK Ref, but drop an alias of "QuickView" in your
  310. Tools folder. The "Find in Toolbox Assistant" command is
  311. at the bottom of the Search menu (<cmd><4>).
  312.  
  313.     Editing and Undo
  314. All basic editing commands are undoable, with a single level
  315. of undo. This includes Replace All.
  316.  
  317. As you work, EnterAct logs all of your activities (including
  318. contents of edits) to the "EnterAct Recent Activities" file. In a
  319. pinch, you can recover the contents of a delete or remind yourself
  320. of what you just did by selecting "Show Activities..." from
  321. the Edit menu.
  322.  
  323. Well, not all of your activities, only the last ten thousand.
  324.  
  325. See «EnterAct 3 Manual» 4638 for a new and nicer way to cut
  326. and paste blocks of code. (To go there: add this file and the
  327. EnterAct 3 Manual to an EnterAct project, then click anywhere
  328. in the first line of this paragraph and use the "Go to" command,
  329. <cmd><,>).
  330.  
  331.     Working with Code Warrior
  332. By default, when you open a document and Code Warrior also
  333. has the document open, EnterAct will force Code Warrior to
  334. close and save the file before opening it, asking you first of
  335. course before doing so. To turn this off,
  336. deselect the "Safe switching under MultiFinder" option
  337. in the Options... dialog (under the Edit menu). Having this
  338. option on also means that EnterAct will save all your
  339. documents when you switch out, and refresh them from
  340. disk when you switch back if they have been changed by
  341. some other application.
  342.  
  343.     The Locations Menu
  344. Select "Add Current Location" to add a sort of "global marker" to
  345. the Locations menu for your current location. This is project
  346. independent, though note the position will not be maintained
  347. if you edit the corresponding source file with another editor.
  348. The text you have selected when you use the Add Current Locations
  349. command will be entered as the default name of the position in
  350. the dialog that subsequently appears: you can edit this name, or
  351. use no name at all and EnterAct will make up a name for you.
  352.  
  353. To remove a location from this menu:
  354. • go to the location (typically by picking it from the Locations menu)
  355. • select Delete Current Location from the Locations menu.
  356.  
  357. If the location does not exist any more, when you pick it from
  358. the Locations menu you will be told it can't be found, and asked if
  359. you want to delete it from the menu.
  360.  
  361. You can have up to 10 different locations under this menu.
  362.  
  363.     Code Templates
  364. Great fun. All templates are stored in the text file "EnterAct
  365. Code Templates", which is very easy to modify (please take a look
  366. at it). Add this file to the folder where you keep EnterAct, at the
  367. same level.
  368.  
  369. To use a template, you type its name and press <command><return>.
  370. And <command><return> will also advance you to the next logical
  371. insertion point in your template (or in any code for that matter). If
  372. you save changes to your "EnterAct Code Templates" file using
  373. EnterAct, your new templates are instantly available (no need to
  374. quit and restart). Templates don't have to contain code, and
  375. template names can contain any non-blank characters, not just
  376. letters and numbers.
  377.  
  378. Each entry has the form
  379. ENTRY
  380. entry_name
  381. arbitrary text
  382.     making up the definition
  383.     of the entry
  384. END
  385.  
  386. For the complete details on code templates, see the top of
  387. the "EnterAct Code Templates" file. If you'd like to try one
  388. now and you're using EnterAct, open a new window and type
  389.  
  390. html<command><return>
  391.  
  392.  
  393. Keep all your entries flush-left, and EnterAct will adjust your
  394. indentation when pasting your template in. Just open up a new line
  395. and tab in to the right position before typing the entry name and
  396. pressing <command><return>.
  397.  
  398. Tip: add "EnterAct Code Templates" to your "Locations" menu so you
  399. can change your templates on the fly.
  400.  
  401. -----------------
  402. Other useful things
  403. -----------------
  404. You can Balance a delimiter by double-clicking on it.
  405.  
  406. EnterAct comes equipped with hAWK, a version of AWK. It really
  407. is "three clicks and Run", with many supplied programs. See the
  408. «hAWK User’s Manual» for details. You can also fire off a hAWK
  409. program by using a command line, and you can save the command
  410. line as a "code template" in the "EnterAct Code Templates" file.
  411. If you'd like to try one now and have fully installed EnterAct,
  412. open up a new window and type the word "time", then hit
  413. <command><return> twice. The first <command><return> expands
  414. "time" into a hAWK command line, and the second <command><return>
  415. runs the corresponding hAWK program. Neat, eh?
  416.  
  417. EnterAct's <Enter>-driven lookup tolerates many kinds of spelling
  418. and (more importantly) memory errors. When in doubt, give it your
  419. best guess and press <Enter>. For extreme cases, use the "Options"
  420. dialog to increase the "Number of entries per lookup window" to 20.
  421. For emergency use only, use <Option><Enter> instead of plain <Enter>
  422. to fire up EnterAct's most error tolerant definition retriever - be
  423. prepared for some wild guesses mixed in there with the good ones!
  424.  
  425. To look up the last word on the clipboard, typically copied while in
  426. another application, press <Command><Enter>. Note if you have
  427. the AutoLook window open it will automatically show a definition
  428. for a word on the clipboard as you switch back to EnterAct.
  429.  
  430. "Go to..." is very general. It accepts line numbers, file names, marker
  431. names, and combinations such as file name/marker name, file
  432. name/line number. Handy for placing references in code files to
  433. supporting documentation. Moderately error tolerant, full correct
  434. spelling not required. To see it work, add the "EnterAct 3 Manual" to
  435. your project if you haven't done so, then click anywhere on the
  436. following line and "Go to":
  437. «EnterAct 3 Man» «17   “Go” cmds»
  438.  
  439. The European-style quotes «» are helpful in most "Go to" link names;
  440. to generate these painlessly, see
  441. «EnterAct 3 Man»  6233 (any individual mark)
  442. and
  443. «EnterAct 3 Man» 7775 (marks in documentation files especially)
  444.  
  445. To open an included file, click on the line in your source where it's
  446. included and use "Go to".
  447.  
  448. EnterAct projects accept PICT files.
  449.  
  450. Printing doesn't clip off long lines, it wraps them around.
  451.  
  452. EnterAct can be used as the THINK Project Managers's editor,
  453. as explained in either the THINK or EnterAct manuals.
  454.  
  455. When EnterAct can't locate a project file, and you have enabled
  456. the "Relocate files automatically" option,  it starts searching
  457. at the top of the disk where the file was last seen and
  458. searches down until it finds it (or not). Renaming or moving
  459. a folder does not affect EnterAct's memory of where a file is.
  460. Activating the "Relocate files automatically" option is NOT
  461. recommended, unless you're absolutely sure all your files
  462. have unique names.
  463.  
  464. If you have favorite AppleScripts to compile projects etc, drop
  465. them in the (EnterAct Scripts) folder for easy access.
  466. The scripts must be compiled scripts, not just text-only.
  467. They should do something simple and straightforward, and then
  468. quit, since you won't be able to continue working in EnterAct
  469. until the script finishes.
  470.  
  471. That's more than enough to get going. If you become inordinately
  472. fond of EnterAct's definition lookup capabilities, be sure to read
  473. through the full manual for details on the above features and a
  474. host of others.
  475.  
  476.